| Server IP : 151.101.66.159 / Your IP : 216.73.216.66 Web Server : Flywheel/5.1.0 System : Linux wordpress 6.12.113+ #1 SMP Thu Oct 22 02:38:20 UTC 2026 x86_64 User : root ( ) PHP Version : 7.4.33.18 Disable Function : disk_free_space,diskfreespace,dl,exec,fpassthru,getmypid,getmyuid,highlight_file,link,opcache_compile_file,opcache_get_configuration,opcache_is_script_cached,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,phpinfo,popen,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,socket_listen,source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wp-content/plugins/file-manager-advanced/application/assets/dist/ |
Upload File : |
/*! For license information please see 322.74193296.chunk.js.LICENSE.txt */
"use strict";(self.webpackChunkafm_react_admin=self.webpackChunkafm_react_admin||[]).push([[322],{322(e,n,t){t.r(n),t.d(n,{default:()=>w});var r=t(6540),o=t(5688),i=t(4848);function a(){var e,n,t="function"==typeof Symbol?Symbol:{},r=t.iterator||"@@iterator",o=t.toStringTag||"@@toStringTag";function i(t,r,o,i){var a=r&&r.prototype instanceof l?r:l,d=Object.create(a.prototype);return c(d,"_invoke",function(t,r,o){var i,a,c,l=0,d=o||[],u=!1,f={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(n,t){return i=n,a=0,c=e,f.n=t,s}};function m(t,r){for(a=t,c=r,n=0;!u&&l&&!o&&n<d.length;n++){var o,i=d[n],m=f.p,v=i[2];t>3?(o=v===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=m&&((o=t<2&&m<i[1])?(a=0,f.v=r,f.n=i[1]):m<v&&(o=t<3||i[0]>r||r>v)&&(i[4]=t,i[5]=r,f.n=v,a=0))}if(o||t>1)return s;throw u=!0,r}return function(o,d,v){if(l>1)throw TypeError("Generator is already running");for(u&&1===d&&m(d,v),a=d,c=v;(n=a<2?e:c)||!u;){i||(a?a<3?(a>1&&(f.n=-1),m(a,c)):f.n=c:f.v=c);try{if(l=2,i){if(a||(o="next"),n=i[o]){if(!(n=n.call(i,c)))throw TypeError("iterator result is not an object");if(!n.done)return n;c=n.value,a<2&&(a=0)}else 1===a&&(n=i.return)&&n.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((n=(u=f.n<0)?c:t.call(r,f))!==s)break}catch(n){i=e,a=1,c=n}finally{l=1}}return{value:n,done:u}}}(t,o,i),!0),d}var s={};function l(){}function d(){}function u(){}n=Object.getPrototypeOf;var f=[][r]?n(n([][r]())):(c(n={},r,function(){return this}),n),m=u.prototype=l.prototype=Object.create(f);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,c(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e}return d.prototype=u,c(m,"constructor",u),c(u,"constructor",d),d.displayName="GeneratorFunction",c(u,o,"GeneratorFunction"),c(m),c(m,o,"Generator"),c(m,r,function(){return this}),c(m,"toString",function(){return"[object Generator]"}),(a=function(){return{w:i,m:v}})()}function c(e,n,t,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}c=function(e,n,t,r){function i(n,t){c(e,n,function(e){return this._invoke(n,t,e)})}n?o?o(e,n,{value:t,enumerable:!r,configurable:!r,writable:!r}):e[n]=t:(i("next",0),i("throw",1),i("return",2))},c(e,n,t,r)}function s(e,n,t,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void t(e)}c.done?n(s):Promise.resolve(s).then(r,o)}function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var d=["Multiple Cloud Integrations.","Frontend access.","Built-in database access.","Role-based access control.","Private folder access.","Hide sensitive files & folders.","Advanced themes selection.","Multilingual support.","Operation controls for users."];function u(e){var n,t,c,u,f=e.onHidden,m=(c=(0,r.useState)(!1),u=2,function(e){if(Array.isArray(e))return e}(c)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,a,c=[],s=!0,l=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;s=!1}else for(;!(s=(r=i.call(t)).done)&&(c.push(r.value),c.length!==n);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(c,u)||function(e,n){if(e){if("string"==typeof e)return l(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?l(e,n):void 0}}(c,u)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),v=m[0],w=m[1],h=function(){var e,n=(e=a().m(function e(n){var t,r,i,c;return a().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n.preventDefault(),!v){e.n=1;break}return e.a(2);case 1:return w(!0),e.p=2,i=(null===(t=window.wpApiSettings)||void 0===t?void 0:t.nonce)||(null===(r=window.afmReact)||void 0===r?void 0:r.nonce)||"",e.n=3,fetch((0,o._H)("file-manager-advanced/v1/hide-banner"),{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":i},body:"{}"});case 3:e.n=5;break;case 4:e.p=4,c=e.v,console.error("Failed to hide banner:",c);case 5:"function"==typeof f&&f();case 6:return e.a(2)}},e,null,[[2,4]])}),function(){var n=this,t=arguments;return new Promise(function(r,o){var i=e.apply(n,t);function a(e){s(i,r,o,a,c,"next",e)}function c(e){s(i,r,o,a,c,"throw",e)}a(void 0)})});return function(e){return n.apply(this,arguments)}}();return(0,i.jsx)("aside",{className:"afm-fm-pro-banner","aria-label":"Advanced File Manager Pro",children:(0,i.jsx)("div",{className:"afm-fm-pro-banner__inner",children:(0,i.jsxs)("div",{className:"afm-fm-pro-banner__body",children:[(0,i.jsx)("h2",{className:"afm-fm-pro-banner__title",children:"Simplify file management with more advanced features!"}),(0,i.jsx)("ul",{className:"afm-fm-pro-banner__features",children:d.map(function(e){return(0,i.jsxs)("li",{className:"afm-fm-pro-banner__feature",children:[(0,i.jsx)("img",{src:((null===(n=window.afmReact)||void 0===n?void 0:n.pluginUrl)||(null===(t=window.afm_object)||void 0===t?void 0:t.plugin_url)||"/wp-content/plugins/file-manager-advanced/")+"application/assets/images/shell/icon-thumb.svg",alt:"",width:16,height:13}),(0,i.jsx)("span",{children:e})]},e);var n,t})}),(0,i.jsxs)("div",{className:"afm-fm-pro-banner__actions",children:[(0,i.jsx)("a",{className:"afm-fm-pro-banner__cta",href:(null===(n=window.afmReact)||void 0===n?void 0:n.fmPricingUrl)||(null===(t=window.afmReact)||void 0===t?void 0:t.pricingUrl)||"https://advancedfilemanager.com/pricing/?utm_source=plugin&utm_medium=file_manager_screen_side_banner&utm_campaign=plugin",target:"_blank",rel:"noopener noreferrer",children:"Upgrade Now"}),(0,i.jsx)("button",{type:"button",className:"afm-fm-pro-banner__hide",onClick:h,disabled:v,children:"Hide Banner"})]})]})})})}function f(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,a,c=[],s=!0,l=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;s=!1}else for(;!(s=(r=i.call(t)).done)&&(c.push(r.value),c.length!==n);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(e,n)||function(e,n){if(e){if("string"==typeof e)return m(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function v(e){var n,t,r=null!==(n=window.afm_object)&&void 0!==n&&n.plugin_url?"".concat(window.afm_object.plugin_url,"application/library/"):"";return function(e,n){if(!e||"en"===e||!n)return Promise.resolve();if(window.elFinder&&window.elFinder.prototype&&window.elFinder.prototype.i18&&window.elFinder.prototype.i18[e])return Promise.resolve();var t="elfinder-i18n-".concat(e);return document.getElementById(t)?Promise.resolve():new Promise(function(r){var o=document.createElement("script");o.id=t,o.src="".concat(n,"js/i18n/elfinder.").concat(e,".js"),o.onload=function(){return r()},o.onerror=function(){return r()},document.head.appendChild(o),setTimeout(r,1200)})}((null===(t=window.afm_object)||void 0===t?void 0:t.locale)||"en",r).then(function(){"function"==typeof window.afmMountElfinder&&window.afmMountElfinder(e),setTimeout(function(){"function"==typeof window.afmResizeElfinder&&window.afmResizeElfinder(),window.dispatchEvent(new Event("resize"))},100)})}function w(e){var n,t,o=e.activeTab,a=(0,r.useRef)(null),c=f((0,r.useState)(!0),2),s=c[0],l=c[1],d=!(null===(n=window.afmReact)||void 0===n||!n.hasPro),m=null===(t=window.afmReact)||void 0===t?void 0:t.hideBanner,w=!0===m||1===m||"1"===m||"yes"===m,h=f((0,r.useState)(function(){return!d&&!w}),2),p=h[0],g=h[1],_=function(){var e=document.getElementById("file_manager_advanced");if(!e||!window.jQuery)return!1;var n=window.jQuery(e);try{var t=n.elfinder("instance");if(t&&"function"==typeof t.exec)return t.exec("reload"),window.dispatchEvent(new Event("resize")),!0}catch(e){}return!1},y=function(){var e=document.getElementById("file_manager_advanced");if(!e||!window.jQuery)return!1;var n=window.jQuery(e);try{var t=n.elfinder("instance");if(!t)return!1;var r=Object.keys(t.roots||{});return r.length>0&&t.roots[r[0]]?t.request({data:{cmd:"open",target:t.roots[r[0]],init:1,tree:1},notify:{type:"open",cnt:1,hideCnt:!0},syncOnFail:!0}):t.exec("reload"),window.dispatchEvent(new Event("resize")),!0}catch(e){return!1}};return(0,r.useEffect)(function(){var e=document.getElementById("file_manager_advanced"),n=document.getElementById("file_manager_advanced_proxy");e&&n&&!n.hasChildNodes()&&n.appendChild(e);var t=document.getElementById("fma_rate_us"),r=document.getElementById("afm-top-banner-proxy");t&&t.parentElement&&r&&!r.hasChildNodes()&&r.appendChild(t);var o=document.querySelector(".afm__right-side");o&&o.parentElement&&o.parentElement.removeChild(o)},[]),(0,r.useEffect)(function(){var e=function(){setTimeout(function(){"true"!==sessionStorage.getItem("afm_force_fm_reinit")&&(y()||_())},120)};return window.addEventListener("afm-filemanager-tab-activated",e),function(){return window.removeEventListener("afm-filemanager-tab-activated",e)}},[]),(0,r.useEffect)(function(){if("filemanager"===o){var e=a.current;if(a.current=o,e&&"filemanager"!==e)return sessionStorage.setItem("afm-active-tab","filemanager"),sessionStorage.removeItem("afm-should-restore-tab"),void window.location.reload();if("true"===sessionStorage.getItem("afm_ai_settings_changed")&&(sessionStorage.removeItem("afm_ai_settings_changed"),sessionStorage.setItem("afm_force_fm_reinit","true")),"true"===sessionStorage.getItem("afm_onedrive_settings_changed"))return sessionStorage.removeItem("afm_onedrive_settings_changed"),sessionStorage.setItem("afm_force_fm_reinit","true"),void window.location.reload();if("true"===sessionStorage.getItem("afm_ui_options_changed")&&sessionStorage.removeItem("afm_ui_options_changed"),"true"===sessionStorage.getItem("afm_locale_changed"))return sessionStorage.removeItem("afm_locale_changed"),void window.location.reload();var n=sessionStorage.getItem("afm_force_fm_reinit"),t="true"===n;if(t&&sessionStorage.removeItem("afm_skip_reinit"),"true"!==sessionStorage.getItem("afm_skip_reinit")||"true"===n){var r=function(){if(window.jQuery&&window.jQuery.fn.elfinder)try{var e,n,t,o,i=document.getElementById("file_manager_advanced");if(!i)return void setTimeout(r,500);var a="true"===sessionStorage.getItem("afm_force_fm_reinit");a&&sessionStorage.removeItem("afm_force_fm_reinit");var c=i.querySelector(".elfinder"),s=window.jQuery(i);if((c||s.data("elfinder"))&&!a)return void _();if(c||s.data("elfinder")){try{s.elfinder&&s.elfinder("destroy")}catch(e){}i.innerHTML=""}var l,d=function(e){if(!e||"string"!=typeof e)return e;try{var n=new URL(e,window.location.origin);return n.protocol=window.location.protocol,n.host=window.location.host,n.toString()}catch(n){return e.startsWith("/")?"".concat(window.location.origin).concat(e):e}}((null===(e=window.wpApiSettings)||void 0===e?void 0:e.root)||(null===(n=window.afmReact)||void 0===n?void 0:n.jsonURL)||"/wp-json/"),u=(null===(t=window.wpApiSettings)||void 0===t?void 0:t.nonce)||(null===(o=window.afmReact)||void 0===o?void 0:o.nonce)||"",f=d.endsWith("/")?d:d+"/";if(f.includes("rest_route=")){var m=f.split("rest_route=")[0]+"rest_route=";l="".concat(m,"/file-manager-advanced/v1/settings&_=").concat(Date.now())}else l="".concat(f,"file-manager-advanced/v1/settings?_=").concat(Date.now());fetch(l,{credentials:"same-origin",headers:{"X-WP-Nonce":u}}).then(function(e){if(!e.ok)throw new Error("Failed to fetch settings");return e.json()}).then(function(e){if(!e||!e.settings){if(!window.afm_object)throw new Error("Invalid settings response");throw new Error("Using fallback settings")}return e}).then(function(e){if(window.afm_object){var n=e.settings;n.fma_locale?window.afm_object.locale=n.fma_locale:void 0!==window.afm_object.locale&&null!==window.afm_object.locale||(window.afm_object.locale="en"),window.afm_object.cm_theme=n.fma_cm_theme||window.afm_object.cm_theme,window.afm_object.theme=n.fma_theme||"light",window.afm_object.hide_path="1"==n.hide_path||1==n.hide_path?1:0,window.afm_object.debug_enabled="1"==n.fma_debug_enabled||1==n.fma_debug_enabled?"1":"0",void 0!==n.display_ui_options&&null!==n.display_ui_options?window.afm_object.ui=Array.isArray(n.display_ui_options)?n.display_ui_options:[]:e.ui_options&&Array.isArray(e.ui_options)&&(window.afm_object.ui=e.ui_options);var t="hide-path",r=document.getElementById(t);if(1==window.afm_object.hide_path){if(!r){var o='<style id="'.concat(t,'" type="text/css">.elfinder-info-path { display:none; } .elfinder-info-tb tr:nth-child(2) { display:none; }</style>');document.head.insertAdjacentHTML("beforeend",o)}}else r&&r.remove()}var i=e.settings.fma_theme||"light";document.querySelectorAll('link[href*="themes/"][href*="/css/theme.css"]').forEach(function(e){e.href.includes("/themes/")&&e.remove()});var a="elfinder-theme-css",c=document.getElementById(a);c&&c.remove();var l=Promise.resolve();if(["dark","grey","windows10","bootstrap","mono","m-light","moono"].includes(i)){var d,u=((null===(d=window.afm_object)||void 0===d?void 0:d.plugin_url)||"")+"application/library/themes/"+i+"/css/theme.css",f=document.createElement("link");f.id=a,f.rel="stylesheet",f.type="text/css",f.href=u,l=new Promise(function(e){f.onload=function(){return e()},f.onerror=function(){return e()},document.head.appendChild(f),setTimeout(function(){return e()},1e3)})}var m=e.settings.fma_cm_theme||"default";document.querySelectorAll('link[href*="codemirror/theme/"]').forEach(function(e){e.href.includes("/codemirror/theme/")&&!e.href.includes("/codemirror/lib/")&&e.remove()});var w="codemirror-theme-css",h=document.getElementById(w);h&&h.remove();var p=Promise.resolve();if("default"!==m){var g,_=((null===(g=window.afm_object)||void 0===g?void 0:g.plugin_url)||"")+"application/library/codemirror/theme/"+m+".css",y=document.createElement("link");y.id=w,y.rel="stylesheet",y.type="text/css",y.href=_,p=new Promise(function(e){y.onload=function(){return e()},y.onerror=function(){return e()},document.head.appendChild(y),setTimeout(function(){return e()},1e3)})}Promise.all([l,p]).then(function(){setTimeout(function(){if(window.afm_object)try{v(s).catch(function(e){console.error("elFinder reinitialize error:",e),window.dispatchEvent(new Event("resize"))})}catch(e){console.error("elFinder reinitialize error:",e),window.dispatchEvent(new Event("resize"))}},300)})}).catch(function(e){"Using fallback settings"!==e.message&&console.error("Failed to fetch settings for elFinder reinitialization:",e),window.afm_object&&setTimeout(function(){try{v(s).catch(function(e){console.error("elFinder reinitialize error:",e),window.dispatchEvent(new Event("resize"))})}catch(e){console.error("elFinder reinitialize error:",e),window.dispatchEvent(new Event("resize"))}},200)})}catch(e){console.error("elFinder reinitialize error:",e),window.dispatchEvent(new Event("resize"))}else setTimeout(r,500)},i=setTimeout(r,t?80:200);return function(){clearTimeout(i)}}sessionStorage.removeItem("afm_skip_reinit")}else a.current=o},[o]),(0,r.useEffect)(function(){var e=function(){"filemanager"===window.location.hash.replace(/^#\/?/,"").toLowerCase().split("/")[0]&&setTimeout(function(){"true"!==sessionStorage.getItem("afm_force_fm_reinit")&&_()},120)};return window.addEventListener("hashchange",e),function(){return window.removeEventListener("hashchange",e)}},[]),(0,r.useEffect)(function(){var e=function(e){!e.detail||"ui_options"!==e.detail.type&&"locale"!==e.detail.type||"filemanager"!==o||(sessionStorage.removeItem("afm_ui_options_changed"),sessionStorage.setItem("afm_force_fm_reinit","true"),setTimeout(function(){y()||_()},100))};return window.addEventListener("afm-settings-changed",e),function(){window.removeEventListener("afm-settings-changed",e)}},[o]),(0,r.useEffect)(function(){if("filemanager"===o){l(!0);var e=function(){var e=document.getElementById("file_manager_advanced_proxy"),n=document.getElementById("file_manager_advanced"),t=!!(e&&e.childNodes&&e.childNodes.length>0),r=!(!n||!n.querySelector(".elfinder"));return!(!t&&!r||(l(!1),0))},n=function(){l(!1),"function"==typeof window.afmResizeElfinder&&window.afmResizeElfinder()};if(!e()){window.addEventListener("afm-elfinder-loaded",n);var t=new MutationObserver(function(){e()});t.observe(document.body,{childList:!0,subtree:!0});var r=setInterval(function(){e()},250),i=setTimeout(function(){l(!1)},8e3);return function(){window.removeEventListener("afm-elfinder-loaded",n),t.disconnect(),clearInterval(r),clearTimeout(i)}}}},[o]),(0,i.jsxs)("div",{id:"afm-file-manager-tab",className:"afm-fm-layout".concat(p?" afm-fm-layout--with-banner":""),children:[(0,i.jsx)("div",{className:"afm-fm-layout__main",children:(0,i.jsxs)("div",{className:"afm-fm-layout__card",children:[s&&(0,i.jsxs)("div",{className:"afm-fm-skeleton",children:[(0,i.jsx)("style",{children:"\n @keyframes afm-skeleton-shimmer {\n 0% { background-position: -200% 0; }\n 100% { background-position: 200% 0; }\n }\n .afm-skeleton {\n background-color: #e2e8f0;\n background-image: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);\n background-size: 200% 100%;\n animation: afm-skeleton-shimmer 1.4s linear infinite;\n }\n "}),(0,i.jsx)("div",{className:"afm-skeleton",style:{height:"40px",width:"260px",borderRadius:"6px",marginBottom:"16px"}}),(0,i.jsx)("div",{className:"afm-skeleton",style:{height:"480px",width:"100%",borderRadius:"8px"}})]}),(0,i.jsx)("div",{id:"afm-top-banner-proxy"}),(0,i.jsx)("div",{id:"file_manager_advanced_proxy"})]})}),p&&(0,i.jsx)(u,{onHidden:function(){g(!1),setTimeout(function(){"function"==typeof window.afmResizeElfinder&&window.afmResizeElfinder(),window.dispatchEvent(new Event("resize"))},50)}})]})}},5688(e,n,t){function r(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,a,c=[],s=!0,l=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;s=!1}else for(;!(s=(r=i.call(t)).done)&&(c.push(r.value),c.length!==n);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(e,n)||function(e,n){if(e){if("string"==typeof e)return o(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?o(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function i(){var e,n;return function(e){if(!e||"string"!=typeof e)return e;try{var n=new URL(e,window.location.origin);return n.protocol=window.location.protocol,n.host=window.location.host,n.toString()}catch(n){return e.startsWith("/")?"".concat(window.location.origin).concat(e):e}}((null===(e=window.wpApiSettings)||void 0===e?void 0:e.root)||(null===(n=window.afmReact)||void 0===n?void 0:n.jsonURL)||"".concat(window.location.origin,"/?rest_route=/"))}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i(),o=t.endsWith("/")?t:"".concat(t,"/"),a=String(e||"").replace(/^\//,""),c=Object.entries(n).filter(function(e){var n=r(e,2)[1];return null!=n&&""!==n}).map(function(e){var n=r(e,2),t=n[0],o=n[1];return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(String(o)))});if(o.includes("rest_route=")){var s="".concat(o.split("rest_route=")[0],"rest_route="),l="".concat(s,"/").concat(a);return c.length&&(l+="&".concat(c.join("&"))),l}if(o.includes("/wp-json")){var d=function(e){try{return new URL(e,window.location.origin).origin}catch(e){return window.location.origin}}(o),u="".concat(d,"/?rest_route=/").concat(a);return c.length&&(u+="&".concat(c.join("&"))),u}var f="".concat(o).concat(a);return c.length&&(f+="?".concat(c.join("&"))),f}t.d(n,{_H:()=>a,lA:()=>i})}}]);
//# sourceMappingURL=322.74193296.chunk.js.map